<?php
/** 初始化项目 */
require '../../app/app.php';
/** 初始化数据库 */
use app\util\Mysql;
$database = Mysql::init();


if (isset($_GET["out"])) {
    $out = $_GET["out"];
    if ($out == "true" || isset($_SESSION["username"]) ) {
        session_destroy();
        echo "<script>alert('退出成功!');location.href='/';</script>";
    } else {
        echo "<script>alert('当前未登录账户!');location.href='/';</script>";
    }
}
